package com.aidex.biz.service.impl;

import java.util.List;
import com.aidex.common.annotation.DataScope;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.entity.SysUser;
import com.aidex.common.core.domain.entity.SysDept;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.framework.cache.DeptUtils;
import com.aidex.framework.cache.UserUtils;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.aidex.biz.mapper.SearchInfoDetailsMapper;
import com.aidex.biz.domain.SearchInfoDetails;
import com.aidex.biz.service.SearchInfoDetailsService;
import org.springframework.transaction.annotation.Transactional;
import com.aidex.common.utils.NumberUtils;

/**
 * 产品链接列Service业务层处理
 * @author sean
 * @email 2074844820@qq.com
 * @date 2023-03-31
 */
@Service
@Transactional(readOnly = true)
public class SearchInfoDetailsServiceImpl extends BaseServiceImpl<SearchInfoDetailsMapper, SearchInfoDetails> implements SearchInfoDetailsService
{
    private static final Logger log = LoggerFactory.getLogger(SearchInfoDetailsServiceImpl.class);

    /**
     * 获取单条数据
     * @param searchInfoDetails 产品链接列
     * @return 产品链接列
     */
    @Override
    public SearchInfoDetails get(SearchInfoDetails searchInfoDetails)
    {
        SearchInfoDetails dto = super.get(searchInfoDetails);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 产品链接列id
     * @return 产品链接列
     */
    @Override
    public SearchInfoDetails get(String id)
    {
        SearchInfoDetails dto = super.get(id);
        return dto;
    }


    /**
     * 查询产品链接列列表
     * @param searchInfoDetails 产品链接列
     * @return 产品链接列
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public List<SearchInfoDetails> findList(SearchInfoDetails searchInfoDetails)
    {
        return super.findList(searchInfoDetails);
    }

    /**
     * 分页查询产品链接列列表
     * @param searchInfoDetails 产品链接列
     * @return 产品链接列
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public PageInfo<SearchInfoDetails> findPage(SearchInfoDetails searchInfoDetails)
    {
        return super.findPage(searchInfoDetails);
    }

    /**
     * 保存产品链接列
     * @param searchInfoDetails
     * @return 结果
     */
    @Override
    public boolean save(SearchInfoDetails searchInfoDetails)
    {
        return super.save(searchInfoDetails);
    }


    /**
     * 删除产品链接列信息
     * @param searchInfoDetails
     * @return 结果
     */
    @Override
    public boolean remove(SearchInfoDetails searchInfoDetails)
    {
        return super.remove(searchInfoDetails);
    }

    /**
     * 批量删除产品链接列
     * @param ids 需要删除的产品链接列ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteSearchInfoDetailsByIds(String[] ids)
    {
        return mapper.deleteSearchInfoDetailsByIds(ids);
    }

    /**
     * 获取最大编号
     * @param searchInfoDetails 产品链接列
     * @return 结果
     */
    @Override
    public int findMaxSort(SearchInfoDetails searchInfoDetails)
    {
        return NumberUtils.nextOrder(mapper.findMaxSort(searchInfoDetails));
    }
}
